<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport"
    content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="x-dns-prefetch-control" content="on">
  <link rel="stylesheet" href="/css/index.css" />
  <link rel="manifest" href="/manifest.json" />
</head>

<body>
  <div id="app">
    <div class="app-page-title">hello pwa basic</div>
    <div class="list-container">
    </div>
  </div>
  <script>
    window.onload = function () {
      if (window.navigator.serviceWorker) {
        const serviceWorker = window.navigator.serviceWorker;
        serviceWorker.register('./sw.js').then(registion => {
          console.log('注册成功', registion);
        }).catch(error => {
          console.log("注册失败")
        })
      }
    }
  </script>
  <script type="text/javascript" src="/js/index.js"></script>
</body>

</html>